import java.util.Scanner;
public class Test6_5 {
    public static void main(String[]args){
        int[]array = new int[100];
        Scanner a = new Scanner(System.in);
        System.out.println("请输入数字");
        int i = a.nextInt();
        try{
            array[i] = i;
        }
        catch(ArrayIndexOutOfBoundsException e){
            System.out.println("数组下标越界");
        }
    }

}

